<?php
abstract class DomArValueSet {
	
	abstract public function add( $key, $value );
	
	public function escape() {
		
	}

}

class DomArInsertValueSet extends DomArValueSet {
	
	private $columns;
	
	private $values;
	
	public function add( $key, $value ) {
		$this->columns .= ',`'.$key.'`';
		$this->values .= ','.$value;
	}
	
	public function getColumns() {
		return substr($this->columns, 1);
	}
	
	public function getValues() {
		return substr($this->values, 1);
	}
	
}

class DomArUpdateValueSet extends DomArValueSet {
	
	private $updates;
	
	public function add( $key, $value ) {
		$this->updates = ',`'.$key.'` = '.$value;
	}
	
	public function getUpdates() {
		return substr($this->updates, 1);
	}
	
}
?>